export function mrmColumns() {
  return [
    {
      type: "selection",
      align: "left",
      width: 50
    },
    {
      title: this.$t("module.resourceManage.resCode"),
      key: "resourceCode",
      
    },
    {
      title: this.$t("module.resourceManage.resName"),
      key: "resourceName",
      
    },
    {
      title: this.$t("module.resourceManage.resourceType"),
      key: "resourceType",
      
    },
    {
      title: this.$t("module.valueSet.isPublic"),
      key: "publicFlag",
      
    },
    {
      title: this.$t("common.status"),
      key: "enabled",
      
    },
    {
      title: this.$t("common.operating"),
      align: "left",
      fixed: "right",
      width: 80,
      render: (h, params) => {
        return h("RowTools", {
          props: {
            data: [
              {
                type: "icon",
                icon: "md-create",
                text: this.$t("common.edit"),
                handle: () => {
                  this.edit(params.row);
                }
              }
            ]
          }
        });
      }
    }
  ];
}

export function copyColumns() {
  return [
    {
      type: "selection",
      align: "left",
      width: 50
    },
    {
      title: this.$t("module.resourceManage.resCode"),
      key: "resourceCode",
      ellipsis: true,
      width: 200,
      render: (h, params) => {
        return h(
          "span",
          {
            attrs: {
              title: params.row.resourceCode,
              href: "#"
            }
          },
          params.row.resourceCode
        );
      }
    },
    {
      title: this.$t("module.resourceManage.resName"),
      key: "resourceName",
      ellipsis: false,
      width: 180,
      render: (h, params) => {
        return h(
          "span",
          {
            attrs: {
              title: params.row.resourceName,
              href: "#"
            }
          },
          params.row.resourceName
        );
      }
    },
    {
      title: this.$t("module.resourceManage.resourceType"),
      key: "resourceType",
      width: 80,
      render: (h, params) => {
        return h(
          "span",
          {
            attrs: {
              title: params.row.resourceType,
              href: "#"
            }
          },
          this.resourceType[params.row.resourceType - 1]
        );
      }
    },
    {
      title: this.$t("module.resourceManage.ownerProduct"),
      key: "productId",
      // width: 240,
      render: (h, params) => {
        return h(
          "span",
          {
            attrs: {
              title: params.row.productId,
              href: "#"
            }
          },
          params.row.productId
        );
      }
    }
  ];
}
